package com.jinlejia.erp.ui.house.prospect.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author 王进 on 2019/1/10.
 */

public class SurveyPictureBean implements Parcelable {
    public SurveyPictureBean() {
        //empty
    }

    private String rscode;  //房源编码
    private String purpose; //用途
    private String apartment; //户型图
    private String rejectReason;    //驳回原因

    private List<RoomBean> room;    //室集合
    private List<RoomBean> hall;    //厅集合
    private List<RoomBean> toilet;  //卫集合
    private List<RoomBean> kitchen; //厨集合

    private List<RoomBean> parkingSpace; //车位
    private List<RoomBean> yard;         //院集合
    private List<RoomBean> lockerRoom;   //储物间集合
    private List<RoomBean> cloakRoom;    //衣帽间集合
    private List<RoomBean> laundryRoom;  //洗衣间集合
    private List<RoomBean> balcony;      //阳台集合
    private List<RoomBean> terrace;      //露台集合
    private List<RoomBean> building;     //楼体正面全景 1
    private List<RoomBean> vestibule;    //玄关集合
    private List<RoomBean> nannyRoom;    //保姆间集合


    private List<RoomBean> sunRoom;      //阳光房集合
    private List<RoomBean> playRoom;     //游戏室
    private List<RoomBean> chessRoom;    //棋牌室
    private List<RoomBean> outdoorScene; //楼体外景
    private List<RoomBean> lobby;        //大堂
    private List<RoomBean> scenery;      //室外风景图
    private List<RoomBean> streetScape;  //街景
    private List<RoomBean> doorWay;      //门头
    private List<RoomBean> indoor;       //室内照片集合
    private List<RoomBean> underground;  //地下室照片集合
    private List<RoomBean> attic;        //阁楼照片集合
    private String applyCode;            //实勘编码
    private String reason;               //顶替理由


    protected SurveyPictureBean(Parcel in) {
        rscode = in.readString();
        purpose = in.readString();
        apartment = in.readString();
        rejectReason = in.readString();
        room = in.createTypedArrayList(RoomBean.CREATOR);
        hall = in.createTypedArrayList(RoomBean.CREATOR);
        toilet = in.createTypedArrayList(RoomBean.CREATOR);
        kitchen = in.createTypedArrayList(RoomBean.CREATOR);
        parkingSpace = in.createTypedArrayList(RoomBean.CREATOR);
        yard = in.createTypedArrayList(RoomBean.CREATOR);
        lockerRoom = in.createTypedArrayList(RoomBean.CREATOR);
        cloakRoom = in.createTypedArrayList(RoomBean.CREATOR);
        laundryRoom = in.createTypedArrayList(RoomBean.CREATOR);
        balcony = in.createTypedArrayList(RoomBean.CREATOR);
        terrace = in.createTypedArrayList(RoomBean.CREATOR);
        building = in.createTypedArrayList(RoomBean.CREATOR);
        vestibule = in.createTypedArrayList(RoomBean.CREATOR);
        nannyRoom = in.createTypedArrayList(RoomBean.CREATOR);
        sunRoom = in.createTypedArrayList(RoomBean.CREATOR);
        playRoom = in.createTypedArrayList(RoomBean.CREATOR);
        chessRoom = in.createTypedArrayList(RoomBean.CREATOR);
        outdoorScene = in.createTypedArrayList(RoomBean.CREATOR);
        lobby = in.createTypedArrayList(RoomBean.CREATOR);
        scenery = in.createTypedArrayList(RoomBean.CREATOR);
        streetScape = in.createTypedArrayList(RoomBean.CREATOR);
        doorWay = in.createTypedArrayList(RoomBean.CREATOR);
        indoor = in.createTypedArrayList(RoomBean.CREATOR);
        underground = in.createTypedArrayList(RoomBean.CREATOR);
        attic = in.createTypedArrayList(RoomBean.CREATOR);
        applyCode = in.readString();
        reason = in.readString();
    }

    public static final Creator<SurveyPictureBean> CREATOR = new Creator<SurveyPictureBean>() {
        @Override
        public SurveyPictureBean createFromParcel(Parcel in) {
            return new SurveyPictureBean(in);
        }

        @Override
        public SurveyPictureBean[] newArray(int size) {
            return new SurveyPictureBean[size];
        }
    };

    public void clear() {
        room = null;          //室集合
        hall = null;          //厅集合
        toilet = null;        //卫集合
        kitchen = null;       //厨集合
        parkingSpace = null; //车位
        yard = null;         //院集合
        lockerRoom = null;   //储物间集合
        cloakRoom = null;    //衣帽间集合
        laundryRoom = null;  //洗衣间集合
        balcony = null;      //阳台集合
        terrace = null;      //露台集合
        building = null;     //楼体正面全景 1
        vestibule = null;    //玄关集合
        nannyRoom = null;    //保姆间集合
        sunRoom = null;      //阳光房集合
        playRoom = null;     //游戏室
        chessRoom = null;    //棋牌室
        outdoorScene = null; //楼体外景
        lobby = null;        //大堂
        scenery = null;      //室外风景图
        streetScape = null;  //街景
        doorWay = null;      //门头
        indoor = null;       //室内照片集合
        reason = null;     //顶替理由
        underground = null;//地下室集合
        attic = null;//阁楼集合
    }

    public boolean hasClear() {
        if (
                room == null &&    //室集合
                        hall == null &&    //厅集合
                        toilet == null &&  //卫集合
                        kitchen == null && //厨集合
                        parkingSpace == null && //车位
                        yard == null &&         //院集合
                        lockerRoom == null &&   //储物间集合
                        cloakRoom == null &&    //衣帽间集合
                        laundryRoom == null &&  //洗衣间集合
                        balcony == null &&      //阳台集合
                        terrace == null &&      //露台集合
                        building == null &&     //楼体正面全景
                        vestibule == null &&    //玄关集合
                        nannyRoom == null &&
                        underground == null &&
                        attic == null
        )
            return true;
        else
            return false;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(rscode);
        dest.writeString(purpose);
        dest.writeString(apartment);
        dest.writeString(rejectReason);
        dest.writeTypedList(room);
        dest.writeTypedList(hall);
        dest.writeTypedList(toilet);
        dest.writeTypedList(kitchen);
        dest.writeTypedList(parkingSpace);
        dest.writeTypedList(yard);
        dest.writeTypedList(lockerRoom);
        dest.writeTypedList(cloakRoom);
        dest.writeTypedList(laundryRoom);
        dest.writeTypedList(balcony);
        dest.writeTypedList(terrace);
        dest.writeTypedList(building);
        dest.writeTypedList(vestibule);
        dest.writeTypedList(nannyRoom);
        dest.writeTypedList(sunRoom);
        dest.writeTypedList(playRoom);
        dest.writeTypedList(chessRoom);
        dest.writeTypedList(outdoorScene);
        dest.writeTypedList(lobby);
        dest.writeTypedList(scenery);
        dest.writeTypedList(streetScape);
        dest.writeTypedList(doorWay);
        dest.writeTypedList(indoor);
        dest.writeTypedList(underground);
        dest.writeTypedList(attic);
        dest.writeString(applyCode);
        dest.writeString(reason);
    }

    //region getter & setter

    public String getRscode() {
        return rscode;
    }

    public void setRscode(String rscode) {
        this.rscode = rscode;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public String getApartment() {
        return apartment;
    }

    public void setApartment(String apartment) {
        this.apartment = apartment;
    }

    public String getRejectReason() {
        return rejectReason;
    }

    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }

    public List<RoomBean> getRoom() {
        return room;
    }

    public void setRoom(List<RoomBean> room) {
        this.room = room;
    }

    public List<RoomBean> getHall() {
        return hall;
    }

    public void setHall(List<RoomBean> hall) {
        this.hall = hall;
    }

    public List<RoomBean> getToilet() {
        return toilet;
    }

    public void setToilet(List<RoomBean> toilet) {
        this.toilet = toilet;
    }

    public List<RoomBean> getKitchen() {
        return kitchen;
    }

    public void setKitchen(List<RoomBean> kitchen) {
        this.kitchen = kitchen;
    }

    public List<RoomBean> getParkingSpace() {
        return parkingSpace;
    }

    public void setParkingSpace(List<RoomBean> parkingSpace) {
        this.parkingSpace = parkingSpace;
    }

    public List<RoomBean> getYard() {
        return yard;
    }

    public void setYard(List<RoomBean> yard) {
        this.yard = yard;
    }

    public List<RoomBean> getLockerRoom() {
        return lockerRoom;
    }

    public void setLockerRoom(List<RoomBean> lockerRoom) {
        this.lockerRoom = lockerRoom;
    }

    public List<RoomBean> getCloakRoom() {
        return cloakRoom;
    }

    public void setCloakRoom(List<RoomBean> cloakRoom) {
        this.cloakRoom = cloakRoom;
    }

    public List<RoomBean> getLaundryRoom() {
        return laundryRoom;
    }

    public void setLaundryRoom(List<RoomBean> laundryRoom) {
        this.laundryRoom = laundryRoom;
    }

    public List<RoomBean> getBalcony() {
        return balcony;
    }

    public void setBalcony(List<RoomBean> balcony) {
        this.balcony = balcony;
    }

    public List<RoomBean> getTerrace() {
        return terrace;
    }

    public void setTerrace(List<RoomBean> terrace) {
        this.terrace = terrace;
    }

    public List<RoomBean> getBuilding() {
        return building;
    }

    public void setBuilding(List<RoomBean> building) {
        this.building = building;
    }

    public List<RoomBean> getVestibule() {
        return vestibule;
    }

    public void setVestibule(List<RoomBean> vestibule) {
        this.vestibule = vestibule;
    }

    public List<RoomBean> getNannyRoom() {
        return nannyRoom;
    }

    public void setNannyRoom(List<RoomBean> nannyRoom) {
        this.nannyRoom = nannyRoom;
    }

    public List<RoomBean> getSunRoom() {
        return sunRoom;
    }

    public void setSunRoom(List<RoomBean> sunRoom) {
        this.sunRoom = sunRoom;
    }

    public List<RoomBean> getPlayRoom() {
        return playRoom;
    }

    public void setPlayRoom(List<RoomBean> playRoom) {
        this.playRoom = playRoom;
    }

    public List<RoomBean> getChessRoom() {
        return chessRoom;
    }

    public void setChessRoom(List<RoomBean> chessRoom) {
        this.chessRoom = chessRoom;
    }

    public List<RoomBean> getOutdoorScene() {
        return outdoorScene;
    }

    public void setOutdoorScene(List<RoomBean> outdoorScene) {
        this.outdoorScene = outdoorScene;
    }

    public List<RoomBean> getLobby() {
        return lobby;
    }

    public void setLobby(List<RoomBean> lobby) {
        this.lobby = lobby;
    }

    public List<RoomBean> getScenery() {
        return scenery;
    }

    public void setScenery(List<RoomBean> scenery) {
        this.scenery = scenery;
    }

    public List<RoomBean> getStreetScape() {
        return streetScape;
    }

    public void setStreetScape(List<RoomBean> streetScape) {
        this.streetScape = streetScape;
    }

    public List<RoomBean> getDoorWay() {
        return doorWay;
    }

    public void setDoorWay(List<RoomBean> doorWay) {
        this.doorWay = doorWay;
    }

    public List<RoomBean> getIndoor() {
        return indoor;
    }

    public void setIndoor(List<RoomBean> indoor) {
        this.indoor = indoor;
    }

    public String getApplyCode() {
        return applyCode;
    }

    public void setApplyCode(String applyCode) {
        this.applyCode = applyCode;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public List<RoomBean> getUnderground() {
        return underground;
    }

    public void setUnderground(List<RoomBean> underground) {
        this.underground = underground;
    }

    public List<RoomBean> getAttic() {
        return attic;
    }

    public void setAttic(List<RoomBean> attic) {
        this.attic = attic;
    }

    //endregion
}
